Optimal. Leaf size=266 \[ \frac {2 (7 A b+7 a B+9 b C) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{15 d}+\frac {10 (9 a A+11 b B+11 a C) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{231 d}+\frac {2 a A \sin (c+d x)}{11 d \sec ^{\frac {9}{2}}(c+d x)}+\frac {2 (A b+a B) \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (9 a A+11 b B+11 a C) \sin (c+d x)}{77 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {2 (7 A b+7 a B+9 b C) \sin (c+d x)}{45 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {10 (9 a A+11 b B+11 a C) \sin (c+d x)}{231 d \sqrt {\sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 266, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 7, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {4159, 4132,
3854, 3856, 2720, 4130, 2719} \begin {gather*} \frac {2 \sin (c+d x) (7 a B+7 A b+9 b C)}{45 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 \sin (c+d x) (9 a A+11 a C+11 b B)}{77 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {10 \sin (c+d x) (9 a A+11 a C+11 b B)}{231 d \sqrt {\sec (c+d x)}}+\frac {10 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) (9 a A+11 a C+11 b B)}{231 d}+\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) (7 a B+7 A b+9 b C)}{15 d}+\frac {2 (a B+A b) \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 a A \sin (c+d x)}{11 d \sec ^{\frac {9}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 3854
Rule 3856
Rule 4130
Rule 4132
Rule 4159
Rubi steps
\begin {align*} \int \frac {(a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sec ^{\frac {11}{2}}(c+d x)} \, dx &=\frac {2 a A \sin (c+d x)}{11 d \sec ^{\frac {9}{2}}(c+d x)}-\frac {2}{11} \int \frac {-\frac {11}{2} (A b+a B)-\frac {1}{2} (9 a A+11 b B+11 a C) \sec (c+d x)-\frac {11}{2} b C \sec ^2(c+d x)}{\sec ^{\frac {9}{2}}(c+d x)} \, dx\\ &=\frac {2 a A \sin (c+d x)}{11 d \sec ^{\frac {9}{2}}(c+d x)}-\frac {2}{11} \int \frac {-\frac {11}{2} (A b+a B)-\frac {11}{2} b C \sec ^2(c+d x)}{\sec ^{\frac {9}{2}}(c+d x)} \, dx-\frac {1}{11} (-9 a A-11 b B-11 a C) \int \frac {1}{\sec ^{\frac {7}{2}}(c+d x)} \, dx\\ &=\frac {2 a A \sin (c+d x)}{11 d \sec ^{\frac {9}{2}}(c+d x)}+\frac {2 (A b+a B) \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (9 a A+11 b B+11 a C) \sin (c+d x)}{77 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {1}{77} (5 (9 a A+11 b B+11 a C)) \int \frac {1}{\sec ^{\frac {3}{2}}(c+d x)} \, dx-\frac {1}{9} (-7 A b-7 a B-9 b C) \int \frac {1}{\sec ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 a A \sin (c+d x)}{11 d \sec ^{\frac {9}{2}}(c+d x)}+\frac {2 (A b+a B) \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (9 a A+11 b B+11 a C) \sin (c+d x)}{77 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {2 (7 A b+7 a B+9 b C) \sin (c+d x)}{45 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {10 (9 a A+11 b B+11 a C) \sin (c+d x)}{231 d \sqrt {\sec (c+d x)}}+\frac {1}{231} (5 (9 a A+11 b B+11 a C)) \int \sqrt {\sec (c+d x)} \, dx-\frac {1}{15} (-7 A b-7 a B-9 b C) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 a A \sin (c+d x)}{11 d \sec ^{\frac {9}{2}}(c+d x)}+\frac {2 (A b+a B) \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (9 a A+11 b B+11 a C) \sin (c+d x)}{77 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {2 (7 A b+7 a B+9 b C) \sin (c+d x)}{45 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {10 (9 a A+11 b B+11 a C) \sin (c+d x)}{231 d \sqrt {\sec (c+d x)}}+\frac {1}{231} \left (5 (9 a A+11 b B+11 a C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx-\frac {1}{15} \left ((-7 A b-7 a B-9 b C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx\\ &=\frac {2 (7 A b+7 a B+9 b C) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{15 d}+\frac {10 (9 a A+11 b B+11 a C) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{231 d}+\frac {2 a A \sin (c+d x)}{11 d \sec ^{\frac {9}{2}}(c+d x)}+\frac {2 (A b+a B) \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (9 a A+11 b B+11 a C) \sin (c+d x)}{77 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {2 (7 A b+7 a B+9 b C) \sin (c+d x)}{45 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {10 (9 a A+11 b B+11 a C) \sin (c+d x)}{231 d \sqrt {\sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in
optimal.
time = 7.01, size = 1371, normalized size = 5.15 \begin {gather*} -\frac {14 \sqrt {2} A b e^{-i d x} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}} \cos ^3(c+d x) \csc (c) \left (-3 \sqrt {1+e^{2 i (c+d x)}}+e^{2 i d x} \left (-1+e^{2 i c}\right ) \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i (c+d x)}\right )\right ) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{45 d (b+a \cos (c+d x)) (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x))}-\frac {14 \sqrt {2} a B e^{-i d x} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}} \cos ^3(c+d x) \csc (c) \left (-3 \sqrt {1+e^{2 i (c+d x)}}+e^{2 i d x} \left (-1+e^{2 i c}\right ) \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i (c+d x)}\right )\right ) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{45 d (b+a \cos (c+d x)) (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x))}-\frac {2 \sqrt {2} b C e^{-i d x} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}} \cos ^3(c+d x) \csc (c) \left (-3 \sqrt {1+e^{2 i (c+d x)}}+e^{2 i d x} \left (-1+e^{2 i c}\right ) \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i (c+d x)}\right )\right ) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{5 d (b+a \cos (c+d x)) (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x))}+\frac {60 a A \cos ^{\frac {7}{2}}(c+d x) F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)} (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{77 d (b+a \cos (c+d x)) (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x))}+\frac {20 b B \cos ^{\frac {7}{2}}(c+d x) F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)} (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{21 d (b+a \cos (c+d x)) (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x))}+\frac {20 a C \cos ^{\frac {7}{2}}(c+d x) F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)} (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{21 d (b+a \cos (c+d x)) (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x))}+\frac {(a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (-\frac {(149 A b+149 a B+198 b C+187 A b \cos (2 c)+187 a B \cos (2 c)+234 b C \cos (2 c)) \cos (d x) \csc (c)}{180 d}+\frac {(1041 a A+1144 b B+1144 a C) \cos (2 d x) \sin (2 c)}{1848 d}+\frac {(43 A b+43 a B+36 b C) \cos (3 d x) \sin (3 c)}{180 d}+\frac {(16 a A+11 b B+11 a C) \cos (4 d x) \sin (4 c)}{154 d}+\frac {(A b+a B) \cos (5 d x) \sin (5 c)}{36 d}+\frac {a A \cos (6 d x) \sin (6 c)}{88 d}+\frac {(187 A b+187 a B+234 b C) \cos (c) \sin (d x)}{90 d}+\frac {(1041 a A+1144 b B+1144 a C) \cos (2 c) \sin (2 d x)}{1848 d}+\frac {(43 A b+43 a B+36 b C) \cos (3 c) \sin (3 d x)}{180 d}+\frac {(16 a A+11 b B+11 a C) \cos (4 c) \sin (4 d x)}{154 d}+\frac {(A b+a B) \cos (5 c) \sin (5 d x)}{36 d}+\frac {a A \cos (6 c) \sin (6 d x)}{88 d}\right )}{(b+a \cos (c+d x)) (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) \sec ^{\frac {5}{2}}(c+d x)} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(610\) vs.
\(2(286)=572\).
time = 0.09, size = 611, normalized size = 2.30
method | result | size |
default | \(-\frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (20160 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +\left (-50400 a A -12320 A b -12320 B a \right ) \left (\sin ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (56880 a A +24640 A b +24640 B a +7920 b B +7920 a C \right ) \left (\sin ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-34920 a A -22792 A b -22792 B a -11880 b B -11880 a C -5544 C b \right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (13860 a A +10472 A b +10472 B a +9240 b B +9240 a C +5544 C b \right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-2790 a A -1848 A b -1848 B a -2640 b B -2640 a C -1386 C b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+675 a A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-1617 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b +825 b B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-1617 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a +825 a C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-2079 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b \right )}{3465 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(611\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.72, size = 280, normalized size = 1.05 \begin {gather*} -\frac {75 \, \sqrt {2} {\left (i \, {\left (9 \, A + 11 \, C\right )} a + 11 i \, B b\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 75 \, \sqrt {2} {\left (-i \, {\left (9 \, A + 11 \, C\right )} a - 11 i \, B b\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 231 \, \sqrt {2} {\left (-7 i \, B a - i \, {\left (7 \, A + 9 \, C\right )} b\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 231 \, \sqrt {2} {\left (7 i \, B a + i \, {\left (7 \, A + 9 \, C\right )} b\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - \frac {2 \, {\left (315 \, A a \cos \left (d x + c\right )^{5} + 385 \, {\left (B a + A b\right )} \cos \left (d x + c\right )^{4} + 45 \, {\left ({\left (9 \, A + 11 \, C\right )} a + 11 \, B b\right )} \cos \left (d x + c\right )^{3} + 77 \, {\left (7 \, B a + {\left (7 \, A + 9 \, C\right )} b\right )} \cos \left (d x + c\right )^{2} + 75 \, {\left ({\left (9 \, A + 11 \, C\right )} a + 11 \, B b\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{3465 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{11/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________